//
//  ChatListViewController.swift
//  PushNotification
//
//  Created by ZHY on 2017/5/19.
//  Copyright © 2017年 ZHY. All rights reserved.
//

import UIKit

class ChatListViewController: RCConversationListViewController {

    
    init() {
        super.init(nibName: nil, bundle: nil)
        
        //设置会话类型   ConversationType_PRIVATE私聊
        setDisplayConversationTypes([RCConversationType.ConversationType_PRIVATE.rawValue])
        
    }
    
    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    override func viewDidLoad() {
        super.viewDidLoad()
        self.title = "消息"
         conversationListTableView.tableFooterView = UIView()
    }
    
    override func onSelectedTableRow(_ conversationModelType: RCConversationModelType, conversationModel model: RCConversationModel!, at indexPath: IndexPath!) {
        let conversationVC = ChatViewController()
        conversationVC.conversationType = model.conversationType;
        conversationVC.targetId = model.targetId;
        conversationVC.title = "聊天详情"
        navigationController?.pushViewController(conversationVC, animated: true)
    }
}
